package com.axjy.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.axjy.mapper.YiCardMapper;
import com.axjy.pojo.YiCard;
import com.axjy.service.YiCardService;
import com.axjy.util.Pager;

@Transactional
@Service("yiCardService")
public class YiCardServiceImpl implements YiCardService{
	
	@Resource
	private YiCardMapper yiCardMapper;

	@Transactional(readOnly=true)
	@Override
	public Pager pager(Integer offset, Integer limit, String columnName, String columnValue) {
		Pager pager=new Pager();
		pager.setRows(yiCardMapper.search(offset, limit, columnName, columnValue));
		pager.setTotal(yiCardMapper.getTotal(columnName, columnValue));
		return pager;
	}
	
	@Override
	public int addYiCard(YiCard yiCard) {
		return yiCardMapper.addYiCard(yiCard);
	}

	@Override
	public int searYiCardId() {
		return yiCardMapper.searYiCardId();
	}

	@Override
	public int delYiCard(Integer yId) {
		return yiCardMapper.delYiCard(yId);
	}

	@Override
	public int updateMoney(YiCard yiCard) {
		return yiCardMapper.updateMoney(yiCard);
	}

	

}
